package com.example.notepad.timer

import android.content.Intent
import android.os.Bundle
import android.widget.Button
import androidx.appcompat.app.AppCompatActivity
import com.example.notepad.R

class TimerActivity : AppCompatActivity() {

    private lateinit var btnStartStopTimer: Button // 正计时按钮
    private lateinit var btnStartCountdown: Button // 倒计时按钮

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_timer)

        // 绑定控件
        btnStartStopTimer = findViewById(R.id.btnStartStopTimer)
        btnStartCountdown = findViewById(R.id.btnStartCountdown)

        // 设置按钮点击事件监听器
        btnStartStopTimer.setOnClickListener {
            val intent = Intent(this, StopwatchActivity::class.java)
            startActivity(intent)
        }

        btnStartCountdown.setOnClickListener {
            val intent = Intent(this, CountdownActivity::class.java)
            startActivity(intent)
        }
    }
}